<template>
  <div class="home">
      home
      <button @click="test">请求测试</button>
      <div>{{name}}</div>
  </div>
</template>

<script>
import {reqInfo} from "@/api"
export default {
name:'home',
data(){
    return{
        name:''
    }
},
methods:{
    test(){
        reqInfo().then((data)=>{
            this.name=data.data.name
           
        })
    }
}
}
</script>

<style>
.home{
    width: 1200px;
    height: 600px;
    margin: 0 auto;
    background-color: red;
}
</style>